<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:86:"/www/wwwroot/crm.liunuo.net/public/../application/user/view/customer/show_mobile.phtml";i:1552999926;s:67:"/www/wwwroot/crm.liunuo.net/application/user/view/base_mobile.phtml";i:1552999924;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title><?php echo config('website.site_name')?></title>
<link rel="stylesheet" type="text/css" href="/static/hui/css/hui.css" />
<style>.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}</style>

<link rel="stylesheet" href="/static/weui/css/pages/xunjia_detail.css" media="all">
<link rel="stylesheet" href="/static/css/fonts.css">

</head>
<body>

<header class="hui-header">
    <div id="hui-back"></div>
    <h1><?php echo $customer['cname']; ?></h1>
    <div id="hui-header-menu" onclick="hui.showSlideMenu();"></div>
</header>
<div class="hui-wrap">
    <div class="hui-list" style="margin-top:12px;">
        <a href="javascript:hui.toast('Hello Hcoder UI !');" style="height:auto; height:80px; padding-bottom:8px;">
            <div class="hui-list-icons" style="width:110px; height:80px;">
                <img src="/static/hui/img/index/account.png" style="width:66px; margin:0px; border-radius:50%;" />
            </div>
            <div class="hui-list-text" style="height:79px; line-height:79px;">
                <?php echo $customer['cname']; ?>
                <div class="hui-list-info">
                    <?php echo user_config_toval('intention',$customer['intention'],'customer'); ?>
                </div>
            </div>
        </a>
        <a href="javascript:hui.toast('Hello Hcoder UI !');">
            <div class="hui-list-text">
                <?php echo user_config_totitle('type','customer'); ?>：<?php echo user_config_toval('type',$customer['type'],'customer'); ?>
            </div>
            <div class="hui-list-text">
                <?php echo user_config_totitle('come_from','customer'); ?>：<?php echo user_config_toval('come_from',$customer['come_from'],'customer'); ?>
            </div>
        </a>
        <a href="javascript:hui.toast('Hello Hcoder UI !');">
            <div class="hui-list-text">
                <?php echo user_config_totitle('status','customer'); ?>：<?php echo user_config_toval('status',$customer['status'],'customer'); ?>
            </div>
            <div class="hui-list-text">
                跟进人：<?php echo get_user_realname($customer['uid']); ?>
            </div>
        </a>
        <a href="javascript:hui.toast('Hello Hcoder UI !');">
            <div class="hui-list-text">
                添加：<?php echo time_trans($customer['create_time']); ?>
            </div>
            <div class="hui-list-text">
                更新：<?php echo time_trans($customer['update_time']); ?>
            </div>
        </a>
        <?php if(is_array($config_customer) || $config_customer instanceof \think\Collection || $config_customer instanceof \think\Paginator): if( count($config_customer)==0 ) : echo "" ;else: foreach($config_customer as $key=>$r): ?>
        <a href="javascript:hui.toast('Hello Hcoder UI !');">
            <div class="hui-list-text">
                <?php echo $r['title']; ?>：<?php if($r['type'] == 'input'): if(isset($customer['jdata'][$r['name']])): ?><?php echo $customer['jdata'][$r['name']]; endif; endif; if($r['type'] == 'textarea'): if(isset($customer['jdata'][$r['name']])): ?><?php echo $customer['jdata'][$r['name']]; endif; endif; if($r['type'] == 'select'): if(isset($customer['jdata'][$r['name']])): ?><?php echo user_config_toval($r['name'],$customer['jdata'][$r['name']],'customer'); endif; endif; if($r['type'] == 'radio'): if(isset($customer['jdata'][$r['name']])): ?><?php echo user_config_toval($r['name'],$customer['jdata'][$r['name']],'customer'); endif; endif; if($r['type'] == 'image'): if(isset($customer['jdata'][$r['name']])): ?><img src="<?php echo $customer['jdata'][$r['name']]; ?>"><?php endif; endif; ?>
            </div>
        </a>
        <?php endforeach; endif; else: echo "" ;endif; ?>
        <a href="javascript:hui.toast('Hello Hcoder UI !');">
            <div class="hui-list-text">
                地址：<?php echo $customer['province']; ?><?php echo $customer['city']; ?><?php echo $customer['area']; ?> <?php echo $customer['address']; ?>
            </div>
        </a>
        <a href="javascript:hui.toast('Hello Hcoder UI !');">
            <div class="hui-list-text">
                备注：<?php if($customer['remark']): ?><?php echo $customer['remark']; else: ?>无<?php endif; ?>
            </div>
        </a>
    </div>
    <a href="javascript:hui.open('tel:<?php echo $customer['mobile']; ?>');" class="hui-button hui-success hui-button-large" style="margin-bottom:15px;font-size:26px;"><i class="fa fa-phone"></i>  <?php echo $customer['mobile']; ?></a>
    <div style="padding-top:5px;">
        <a href="javascript:hui.open('<?php echo url('user/customer/edit', ['id' => $id]); ?>');" class="hui-button hui-button-small hui-primary hui-fl" style="width:25%"><i class="fa fa-edit"></i> 修改</a>
        <a href="javascript:hui.open('<?php echo url('user/customer/add_track', ['id' => $id]); ?>');" class="hui-button hui-button-small hui-danger hui-fl" style="width:25%"><i class="fa fa-check-square-o"></i> 写跟进</a>
        <a href="javascript:hui.open('<?php echo url('user/customer/add_remind', ['id' => $id]); ?>');" class="hui-button hui-button-small hui-primary hui-fl" style="width:25%"><i class="fa fa-clock-o"></i> 设提醒</a>
        <a href="javascript:hui.open('<?php echo url('user/order/add', ['cid' => $id]); ?>');" class="hui-button hui-button-small hui-danger hui-fl" style="width:25%"><i class="fa fa-user-plus"></i> 录订单</a>
    </div>
    <div style="padding:10px 0px;">
        <div class="hui-tab">
            <div class="hui-tab-title">
                <div>跟踪记录<span class="hui-badge hui-danger"><?php echo count($track); ?></span></div>
                <div>提醒记录<span class="hui-badge hui-danger"><?php echo count($remind); ?></span></div>
                <div>交易记录<span class="hui-badge hui-danger"><?php echo count($order); ?></span></div>
            </div>
            <div class="hui-tab-body">
                <div class="hui-tab-body-items">
                    <div class="hui-tab-item hui-list">
                        <?php if(is_array($track) || $track instanceof \think\Collection || $track instanceof \think\Paginator): if( count($track)==0 ) : echo "" ;else: foreach($track as $key=>$r): $user = \app\common\model\User::get($r['uid']);?>
                        <div class="hui-accordion">
                            <div class="hui-accordion-title"><?php echo $r['create_time']; ?> - <?php echo user_config_toval('type',$r['type'],'track'); ?> - <?php if($user['realname']): ?><?php echo $user['realname']; else: ?><?php echo $user['username']; endif; ?></div>
                            <div class="hui-accordion-content" style="line-height:22px;padding-left:20px;">
                                <?php if(is_array($config_track) || $config_track instanceof \think\Collection || $config_track instanceof \think\Paginator): if( count($config_track)==0 ) : echo "" ;else: foreach($config_track as $key=>$v): ?>
                                <b><?php echo $v['title']; ?>：</b>
                                    <?php if($v['type'] == 'input'): if(isset($r['jdata'][$v['name']])): ?><?php echo $r['jdata'][$v['name']]; endif; endif; if($v['type'] == 'textarea'): if(isset($r['jdata'][$v['name']])): ?><?php echo $r['jdata'][$v['name']]; endif; endif; if($v['type'] == 'select'): if(isset($r['jdata'][$v['name']])): ?><?php echo user_config_toval($v['name'],$r['jdata'][$v['name']],'track'); endif; endif; if($v['type'] == 'radio'): if(isset($r['jdata'][$v['name']])): ?><?php echo user_config_toval($v['name'],$r['jdata'][$v['name']],'track'); endif; endif; if($v['type'] == 'image'): if(isset($r['jdata'][$v['name']])): ?><img src="<?php echo $r['jdata'][$v['name']]; ?>" ><?php endif; endif; ?><br>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                                <b>跟踪备注：</b><?php echo $r['remark']; ?>
                            </div>
                        </div>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                        <div class="pages"><?php echo $track->mobile_render(); ?></div>
                    </div>
                    <div class="hui-tab-item hui-list">
                        <?php if(is_array($remind) || $remind instanceof \think\Collection || $remind instanceof \think\Paginator): if( count($remind)==0 ) : echo "" ;else: foreach($remind as $key=>$r): ?>
                        <a id="btnremind<?php echo $r['id']; ?>">
                            <div class="hui-list-text">
                                <?php echo date('Y-m-d',$r['remind_time'])?> &nbsp;&nbsp;&nbsp;<?php echo $r['remark']; ?>
                                <span class="right" style="padding-top:8px;padding-right: 10px;">
                                    <?php if($r['status']=='0'): ?>
                                    <button  class="hui-button hui-button-small hui-danger hui-fl">待处理</button>
                                    <?php else: ?>
                                    <button  class="hui-button hui-button-small hui-primary hui-fl">已处理</button>
                                    <?php endif; ?>
                                </span>
                            </div>
                        </a>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </div>
                    <div class="hui-tab-item hui-list">
                        <?php if(is_array($order) || $order instanceof \think\Collection || $order instanceof \think\Paginator): if( count($order)==0 ) : echo "" ;else: foreach($order as $key=>$o): ?>
                        <a id="btnorder<?php echo $o['id']; ?>">
                            <div class="hui-list-text">
                                <?php echo $o['create_time']; ?> &nbsp;&nbsp;&nbsp;￥ <?php echo $o['total']; ?> 元
                            </div>
                        </a>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<br><br><br>

<div class="hui-slide-menu">
    <ul>
        <?php if(is_array($navbar) || $navbar instanceof \think\Collection || $navbar instanceof \think\Paginator): if( count($navbar)==0 ) : echo "" ;else: foreach($navbar as $key=>$v): if($v['id']=='1'): if(is_array($v['children']) || $v['children'] instanceof \think\Collection || $v['children'] instanceof \think\Paginator): if( count($v['children'])==0 ) : echo "" ;else: foreach($v['children'] as $key=>$n1): ?>
                    <li><a href="javascript:hui.open('<?php echo \think\Request::instance()->root(true); ?>/<?php echo $n1['url']; ?>');"><?php echo $n1['name']; ?></a></li>
                <?php endforeach; endif; else: echo "" ;endif; endif; endforeach; endif; else: echo "" ;endif; ?>
        <li><a href="javascript:hui.open('<?php echo url('user/index/logout'); ?>');">退出账户</a></li>
        <li style="padding-top:30px;">
            <button type="button" class="hui-button hui-button-large" onclick="hui.closeSlideMenu();">关闭菜单</button>
        </li>
    </ul>
</div>
<div id="hui-footer">
    <a href="javascript:hui.open('/user/');" id="nav-home">
        <div class="hui-footer-icons hui-icons-home"></div>
        <div class="hui-footer-text">首页</div>
    </a>
    <a href="javascript:hui.open('/user/customer/track');" id="nav-news">
        <div class="hui-footer-icons hui-icons-news"></div>
        <div class="hui-footer-text">跟踪</div>
    </a>
    <div style="width:20%; text-align:center;" class="hui-fl">
        <img src="/static/hui/img/logo_footer.png" height="44" onclick="hui.open('/user/customer/');" />
    </div>
    <a href="javascript:hui.open('/user/customer/remind');" id="nav-forum">
        <div class="hui-footer-icons hui-icons-forum"></div>
        <div class="hui-footer-text">提醒</div>
    </a>
    <a href="javascript:hui.showSlideMenu();" id="nav-my" id="hui-header-menu" onclick="hui.showSlideMenu();">
        <div class="hui-footer-icons hui-icons-my"></div>
        <div class="hui-footer-text">我的</div>
    </a>
</div>
<script src="/static/hui/js/hui.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
hui.slideMenu();
//hui('#nav-my').pointMsg();
//hui('#nav-news').pointMsg('hot', null, null, null, '1px');
<?php $remind_sum= today_remind_sum();?>
hui('#nav-forum').pointMsg(<?php echo $remind_sum['count']; ?>);
</script>
<script src="/static/libs/layui/layui.all.js"></script>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/layui.base_mobile.js"></script>

<script type="text/javascript" src="/static/hui/js/hui-accordion.js"></script>
<script type="text/javascript">
<?php if(is_array($remind) || $remind instanceof \think\Collection || $remind instanceof \think\Paginator): if( count($remind)==0 ) : echo "" ;else: foreach($remind as $key=>$r): ?>
hui('#btnremind<?php echo $r['id']; ?>').click(function(){hui.alert('<?php if($r["status"]==1): ?><?php echo $r['status_remark']; ?>(<?php echo $r['status_time']; ?>)<?php endif; ?>','好的', function(){});});
<?php endforeach; endif; else: echo "" ;endif; if(is_array($order) || $order instanceof \think\Collection || $order instanceof \think\Paginator): if( count($order)==0 ) : echo "" ;else: foreach($order as $key=>$o): ?>
hui('#btnorder<?php echo $o['id']; ?>').click(function(){hui.alert('<?php echo $o['remark']; ?>','好的', function(){});});
<?php endforeach; endif; else: echo "" ;endif; ?>
hui.accordion(true, false);

</script>
<script src="/static/hui/js/hui-tab.js" type="text/javascript"></script>
<script type="text/javascript">
hui.tab('.hui-tab');
</script>

</body>
</html>